package com.base.cn.platform.os.service.manage.role;

import com.base.cn.platform.os.service.FeignAuthConfig;
import com.base.cn.platform.os.service.manage.BaseService;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 角色接口
 *
 * @author s.li
 * @create 2018-03-19 14:17
 */
@FeignClient(name = BaseService.appName ,configuration = FeignAuthConfig.class)
public interface SysRoleService extends BaseService {

    @RequestMapping(contextPath + "/roleCount")
    BigDecimal count();

    @RequestMapping(contextPath + "/findSysRoleListCondition")
    List<Map<String,Object>> findSysRoleListCondition(@RequestBody Map<String, Object> sysRole);

    @RequestMapping(contextPath+"/findSysRoleList")
    Map<String,Object> findSysRoleList(@RequestBody Map<String, Object> sysRole, @RequestParam("currentPage") int currentPage);

    @RequestMapping(contextPath+"/updateOrAddRole")
    Map<String,Object> updateOrAddRole(@RequestBody Map<String, Object> sysRole);

    @RequestMapping(contextPath+"/updateRoleStatus")
    Map<String,Object> updateRoleStatus(@RequestParam("roleIds") String roleIds, @RequestParam("status") Integer status);

    @RequestMapping(contextPath+"/deleteSysRoleByIds")
    Map<String,Object> deleteSysRoleByIds(@RequestParam("ids") String ids);

    @RequestMapping(contextPath+"/findSysRoleById")
    Map<String,Object> findSysRoleById(@RequestParam("roleId") BigDecimal roleId,
                                       @RequestParam("subjectData") boolean subjectData,
                                       @RequestParam("sysFunctionData") boolean sysFunctionData);
}
